package cn.bdqn.witcity.service;

import cn.bdqn.witcity.entity.Role;
import cn.bdqn.witcity.mapper.RoleMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoleServiceImpl implements RoleService{
    @Resource
    RoleMapper roleMapper;
    @Override
    public List<Role> getAllRole(Role role) {
        return roleMapper.getAllRole(role);
    }

    @Override
    public int addRole(Role role) {
        return roleMapper.addRole(role);
    }

    @Override
    public int getRoleCount(Role role) {
        return roleMapper.getRoleCount(role);
    }

    @Override
    public int updateRole(Role role) {
        return roleMapper.updateRole(role);
    }

    @Override
    public int delRole(Integer id) {
        return roleMapper.delRole(id);
    }

    @Override
    public int addMenuRole(Integer rid, Integer mid) {
        return roleMapper.addMenuRole(rid,mid);
    }
}
